package com.lzq.aopdemo.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
@Component
public class TimeAspect {

//    @Around("execution(* com.lzq.aopdemo.controller.*.*(..))")
//    public Object recordTime(ProceedingJoinPoint p) throws Throwable {
//        long begin = System.currentTimeMillis();
//        Object result = p.proceed();
//        long end = System.currentTimeMillis();
//        log.info(p.getSignature()+"执行耗时:{}ms",end-begin);
//        return result;
//    }
}
